home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
526-550
/
disk_527
/
toolmanager
/
toolmanager.doc
< prev
next >
Wrap
Text File
|
1992-05-06
|
18KB
|
445 lines
Documentation for ToolManager 1.4 09.07.1991
NOTE to first time users: Please read the entire document!
NOTE to users of ToolManager 1.0-1.3: This version contains MANY changes and
enhancements, so please re-read the
entire document!
This program is freely distributable, but copyrighted by me. This means that
you can copy it freely as long as you don't ask for any more money than a
nominal fee for copying. THIS APPLIES TO GERMAN PD DEALERS TOO!!! This program
may be put on PD disks, especially on Fred Fish's AmigaLibDisks. If you want to
distribute this program you MUST keep this document and the source code with
it. Program, document and source code must be distributed in their original
unmodified form. Of course you can use an archiver like LHarc to make it
available on mailboxes and FTP sites. This program cannot be used for
commercial purposes without written permission from the author. The author can
not be made responsible for any damage which is caused by using this program.
This program is freely distributable, so you don't have to spend a buck for it.
But this program has costed me a lot of time (and sweat) to create it
(especially the version 1.3), so the only thing that I demand for it is, that
you sent me a note if you are using ToolManager.
Send comments, suggestions or bug reports to:
Snail : Stefan Becker, Holsteinstrasse 9, 5100 Aachen, GERMANY
Domain: stefanb@cip-s01.informatik.rwth-aachen.de
Bang : ..mcvax!unido!rwthinf!cip-s01!stefanb
FIDO : 2:242/7.6
I. What is ToolManager?
ToolManager is a management utility for tools under the 2.0 Workbench. You can
add your own programs to the Tools menu or add a special Application Icon to
the Workbench. The programs can be started by selecting their entries in the
Tools menu and any selected icon from the Workbench will be the startup
parameters for the program. You can also start a program by dropping an icon on
the Application Icon or by double-clicking the icon. Last but not least you can
start a program with a keyboard short cut.
BEWARE: This program makes heavely use of the new 2.0 functions, so its
completely useless to all people who are still forced to use 1.3 :-)
II. How to start ToolManager
ToolManager can be started from the CLI or the Workbench:
CLI: Run ToolManager NOICON/S,CONFIG/K,POPUP/S,POPKEY/K,CXPRIO/K/N,
NOREQ/S,Tools/M
Parameter Description Default
NOICON : Don't show the program icon Show icon
CONFIG <file> : Name of configuration file S:ToolManager.config
POPUP : Open status window after startup Don't open
POPKEY <key> : Commodities HotKey definition "rcommand help"
CXPRIO <num> : Commodities priority 0
NOREQ : Don't display quit requester Show requester
Tools : Name of programs to add to the menu
The name of tool x will also be the name of its corresponding menu item.
All programs will be added as CLI tools.
NOTE: If you want to start ToolManager at boot time, you can add the
following line to your S:Startup-Sequence:
Run >NIL: ToolManager [parameters...]
NOTE: For a quick reminder of this options type: ToolManager ?
Workbench: <Click on ToolManager's icon>
[<Click on program 1's icon>] ...
[<Double click program n's icon>]
ToolTypes: SHOWICON=NO|YES Show the icon
INTERNALICON Use the internal icon instead of the startup
icon
CONFIG=<name> Read "name" as configuration file instead of
"S:ToolManager.config"
CX_POPUP=YES|NO Open the status window after startup
CX_POPKEY=<key> Set status window HotKey
CX_PRIORITY=<num> Set ToolManagers Commodities priority
SHOWREQ=YES|NO Show quit requester
The name of the icon will also be the name of its corresponding menu item.
All programs will be added as WB tools.
NOTE: If you want to start ToolManager at Workbench startup time, move its
icon into the Wbstartup drawer and add the ToolType 'DONOTWAIT' to
it. ToolManager uses the icon from which it was started as its icon,
if you don't set the 'INTERNALICON' ToolType.
After startup you will notice additional entries in the Workbench Tools menu
and a neat icon on the Workbench (if you don't disable it). To stop ToolManager
you can select the menu entry "Quit ToolManager" or send a break signal to his
process.
NOTE: You can't exit ToolManager if a Workbench tool is still running.
ToolManager will flash the screen if you try it.
III. The configuration file
After processing the startup parameters, ToolManager reads the configuration
file. It is normally called "S:ToolManager.config", but this can be overriden
by the CLI/WB Parameter 'CONFIG'. The configuration file consists of one or
more of the following entries (all keywords are case insensitiv):
<Tool type keyword>:
<Parameter keyword> = <parameter>
.
.
<Parameter keyword> = <parameter>
#
Tool type keyworda
dummy Non operational dummy tool
cli CLI tool
wb WB tool
Parameter keywords
alias Name for the menu entry and the icon.
realname Program name of the tool. If this one is missing, the alias
name will be used to start the tool.
workdir Path name of the current directory for the tool. When a tool is
started, it will use this directory as current directory.
ToolManager will also search the icon file in this directory. If
this one is missing, ToolManager's startup directory will be
used.
stack Stack size for the tool. Minimum is 4096 bytes.
hotkey Hot key description. When you issue this key combination
Toolmanager will start this tool. See table below for the
Commodities HotKey description keywords. Default: No hot key.
args Switch the arguments passing on or off. If a tool does not
except startup parameters or doesn't need them, you can switch
off the argument passing with this option. Default: On.
menu Switch the menu item on or off. Default: On.
icontype Type of icon file. This can be a normal icon (Icon) or an
IFF file (Brush). Default: Icon.
iconfile File name of icon. If this one is missing the real name or the
alias name will be used.
iconpos Position of the icon. Default: No fixed position.
The icon will appear if any of the icon parameters are supplied.
There is one special configuration file line for describing the position of the
ToolManager icon:
ICON:<x>,<y>
NOTE
If the program name contains spaces (e.g. ram disk:prog) you MUST enclose
it with double quotes (e.g. "ram disk:prog").
NOTE (Dummy tools)
This tools do actually nothing and exist only for "aesthetic" reasons.
NOTE (CLI tools)
You can add any command line parameters after the program name.
NOTE (WB tools)
It is not possible to supply command line parameters for a WB tool.
HotKeys are done via via Commodities. A hot key description looks like this:
[<qualifier> [<qualifier>...]] <key>
Qualifier keywords
alt either Alt key
ralt right Alt key
lalt left Alt key
shift either Shift key
rshift right Shift key
lshift left Shift key
capslock Caps Lock key
rcommand right Amiga key
lcommand left Amiga key
control Control key
numericpad Enables the use of a key on the numeric keypad
rbutton Click the right mouse button
midbutton Click the middle mouse button
leftbutton Click the left mouse button
newprefs Preferences changed
diskremoved Disk removed
diskinserted Disk inserted
Keys
a .. z, 0 .. 9, etc. Normal keys
f1 .. f10 Function keys
up, down, left, right Cursor keys
help Help key
del Delete key
return Return key
enter Enter key
backspace Backspace key
esc Escape key
space Space key
comma Comma key
upstroke Upstroke key
NOTE
Choose your hot keys CAREFULLY, because Commodities has a high priority in
the input events chain!
Configuration file examples:
ICON:200,10
WB:
Alias = New Shell
RealName = C:NewShell
Menu = OFF
IconFile = SYS:Shell
IconPos = 300,200
#
CLI:
Alias = Edit Text (CLI)
RealName = C:DME
WorkDir = SYS:
Stack = 20000
HotKey = ralt e
IconFile = Editor.iff
IconType = Brush
IconPos = 300,250
#
DUMMY:
Alias =
#
The last one gives you an empty menu entry. For more examples please look into
the supplied configuration file.
IV. How to use ToolManager
When ToolManager is active, you can see additional entries in the Workbench
Tools menu. To start a tool you select its entry. Easy, isn't it? You can also
select some icons on the Workbench to supply the tool with parameters. If the
tool has an icon you can start it with a double-click or by dropping another
icon on the tool icon. Last but not least you can start a tool with a HotKey.
ToolManager supports two different startup methods for tools:
CLI startup
The tool is started as a CLI process. The selected icons will be converted
to file names, which are then joined with the tool name to a CLI command
line. The system default stack size will be used to run the tool.
NOTE: There is a limitation of 256 characters for the resulting command
line.
Workbench startup
The tool is started as a Workbench process. If the tool has a project icon,
ToolManager will retrieve the name of the default tool. From the tool icon
it will read the ToolWindow definition and the stack size. This one will
override the configuration file stack parameter if it is greater. The
selected icons will be directly passed to the tool.
There are two special menu entries. The first one is "Quit ToolManager", which
causes ToolManager to quit if you select it. The second one is "Open TM Window",
(this one shows only up if the program icon is switched off ) which causes
ToolManager to open its status window. You can also open this window by double
clicking the program icon.
To add a new tool, you just drag a Tool (or Project) icon on ToolManager's icon
or on the status window and it will be added as a WB tool. If you start
ToolManager a second time, it will pass its startup parameters to the already
running ToolManager process. They will be added as WB tools if an icon exists
for them, otherwise as CLI tools.
The status window contains a list of all tools and allows you to manipulate
them. You can select a tool by clicking on its name in the list. If you double
click an item the tool will be started. The status windows contains some
gadgets to manipulate the tool list or to control ToolManager. All these
gadgets also have entries in the status window menu (Right Amiga keyboard short
cuts in parenthesis).
New (N)
This adds an empty dummy tool to the list.
Edit (E)
A new window will open, which shows the actual definition of the selected
tool. It is displayed in the same format which is used in the configuration
file. You can now change the definition. If you select the OK gadget, the
changes will be used over by ToolManager. To cancel your action, click on
the cancel or close gadget.
NOTE: The changed menu entry will be added to the END of the list. This
is because 2.0 provides no choice where to put the menu entry. But
the tool entry will remain at the old position and if when you save
the configuration, it will appear at its old place.
NOTE: To create a menu entry with an empty name, the Alias string gadget
MUST contain at least one space.
Start (S)
Start the selected tool.
NOTE: You can not supply any selected icons as startup parameters if you
use the start gadget or the double click feature of the list gadget.
The same is true for HotKey startup.
Remove (R)
Remove the selected tool.
Save (C)
A file requester will open, in which you can select the name of the
configuration save file. If you click on the OK gadget, ToolManager will
write its actual configuration on this file.
Enable (A)
This enables the HotKey feature.
Disable (D)
This disables the HotKey feature.
Quit (Q)
Quit ToolManager.
You can close the status window by clicking its close gadget or using the Hide
menu entry (Short cut: Right Amiga H). It will remember its current screen
position for the next time you open it.
V. Caveats
If you start a program as Workbench tool and it immediately crashes with a
GURU #87000004, then the startup code of this program contains a bug. This
can be circumvented (hopefully :-) by using it as a CLI tool.
There have been several reports of mysterious ToolManager crashes, but they
turned out to be bugs in the tools or the configuration. So if you experience
mysterious crashes, check your tools and configuration first, before you start
to yell at me:
- Set the stack size higher,
- Switch the tool type from CLI to WB (or vice versa),
- Check if the selected icons crashed the tool (e.g. wrong parameters).
If so, switch off the argument passing (Args=Off)
- Set the stack size even higher,
- Try a newer version of the tool,
- Set the stack size to the highest possible value,
- and last (but not least): The tool is TOO BUGGY, dump it and try another
one :-)
The configuration files of version 1.0-1.3 will NOT be recognized by the new
version 1.4. Please re-read the corresponding chapter for the changes.
Now to some weird things, that are NOT bugs or 'undocumented features' of my
my program:
- The Workbench seems not to support multiple menu selects.
- The Workbench looses menu select events when it is busy (e.g. if a disk is
inserted). So if you insert a disk and select a tool menu entry at the
same time, the tool will NOT be started, because ToolManager didn't
receive the menu event.
VI. How to compile ToolManager
This program was developed with DICE (nice job Matt!). You will need the
registered version, because I used the __chip keyword, but DICE is worth its
$50 anyway. Of course you need the 2.0 include files and the 2.0 amiga.lib.
VII. TODO (or not :-)
- Load 2 IFF images to build an icon with two images.
- Better looking internal icon (hey, I'm not a painter :-).
- "About" menu entry with a super MEGA demo, containing astonishing 2D & 3D
graphics and 16 Bit digitized stereo sound (Hi Juergen :-).
The following things CANNOT be implemented (yet):
- More than one Tools menu.
- Sub menus in the Tools menu.
- The 2.0 menu bar line cannot be used in menu entries.
VIII. HISTORY
1.4: Release version (09.07.1991)
- Keyboard short cuts for tools.
- AppIcons for tools.
- Menu item can be switched off.
- Configuration file format completely changed (hopefully the last time)
- CLI commandline parsing is now done by ReadArgs().
- Status & edit window updated to new features.
- Safety check before program shutdown added.
- Menu item "Open TM Window" only appears, if the program icon is disabled
- WB startup method changed. Now supports project icons.
- several internal changes.
1.3: Release version (13.03.1991)
(Appeared on Fish Disk #476)
- Now supports different configuration files
- Format of the configuration file slightly changed
- Tool definitions can be changed at runtime
- Now supports CLI & Workbench startup method
- Selected icons are passed as parameters to the tools
- Now uses the startup icon as program icon if started from Workbench
- The position of the icon can now be supplied in the configuration file
- The program icon can now be disabled
- New menu entry "Show TM Window"
- Every new started ToolManager passes its startup parameters to the
already running ToolManager process
1.2: Release version (12.01.1991)
(First version to appear on a Fish Disk: #442)
- Status window changed to a no-GZZ & simple refresh type
(this should save some bytes)
- Status window remembers its last position
- New status window gadget "Save Configuration": saves the actual tool
list in the configuration file
- Small bugs removed in the ListView gadget handling
- Name of the icon hard-wired to "ToolManager"
1.1 Release version (01.01.1991)
- Icons can be dropped on the status window
- Status window contains a list of all tool names
- Tools can be removed from the list
1.0 Release version (04.11.1990)
- Initial release
IX. THANKS TO
Martin Horneffer, Juergen Lueg, Georg Sassen,
Brian Wright (icons, IRC online debugging & never ending source of ideas),
Roger Westerlund & Rickard Olsson (strange bug reports :-),
and anyone I forgot to mention for their suggestions, beta testing, support,
flames.....
Stefan Becker